/**
 * 1.公共底部导航
 */
function fixBottomNav(name = "home") {

  //创建div
  const div = document.createElement('div')

  //添加类名
  div.className = `bottomNav`;

  //添加HTML内容
  div.innerHTML = `
  <div class="botNav">
    <a class="${name === 'home' ? 'activ' : ''}" href="./home.html">
        <span class="iconfont icon-shouye"></span>
        <span>首页</span>
    </a>
    <a class="${name === 'motionRun' ? 'activ' : ''}" href="./motionRun.html">
        <span class="iconfont icon-xinshuai"></span>
        <span>运动</span>
    </a>
    <a class="${name === 'circleFollow' ? 'activ' : ''}" href="./circleFollow.html">
        <span class="iconfont icon-quanzi"></span>
        <span>圈子</span>
    </a>
    <a class="${name === 'myUser' ? 'activ' : ''}" href="./myUser.html">
        <span class="iconfont icon-wode1"></span>
        <span>我的</span>
    </a>
  </div>
  `

  //将div追加到body中
  document.body.append(div)

}


// /**
//  * 2.运动导航栏
//  */

// //
// function motionTopNav(name = "motionRun"){
//   //创建元素节点
//   let div = document.createElement('div')
  
//   //添加类名
//   div.classList.add = 'runNav container'
  
//   // 创建文本节点
//   div.innerHTML = `
//     <div class="container">
//       <p class="${neme === 'motionRun' ? 'navActv' : ''}"><a href="./motionRun.html">跑步</a></p>
//       <p class="${neme === 'motionRide' ? 'navActv' : ''}"><a href="./motionRide.html">骑行</a></p>
//       <p class="${neme === 'motionTrain' ? 'navActv' : ''}"><a href="./motionTrain.html">课程训练</a></p>
//     </div>
//   `
  
//   // 将div追加到body中
//   document.body.prapend(div)
// }

//导出对象
module.exports = {
  fixBottomNav
}


